package com.ssy.lingxi.member.merchant.api.model.vo.inner.request;

import com.ssy.lingxi.member.merchant.api.handler.annotation.MemberRightSpendTypeAnno;

import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * 会员权益积分消费VO
 * @author 万宁
 * @version 2.0.0
 * @date 2020-11-20
 */
public class MemberFeignRightSpendVO implements Serializable {
    private static final long serialVersionUID = 2254706262763926081L;

    /**
     * 商品提供方的会员Id
     */
    @NotNull(message = "商品提供方的会员Id要大于0")
    @Positive(message = "商品提供方的会员Id要大于0")
    private Long upperMemberId;

    /**
     * 商品提供方的角色Id
     */
    @NotNull(message = "商品提供方的会员角色Id要大于0")
    @Positive(message = "商品提供方的会员角色Id要大于0")
    private Long upperRoleId;

    /**
     * 买方会员Id
     */
    @NotNull(message = "买方的会员角色Id要大于0")
    @Positive(message = "买方的会员角色Id要大于0")
    private Long subMemberId;

    /**
     * 买方会员角色Id
     */
    @NotNull(message = "买方的会员角色Id要大于0")
    @Positive(message = "买方的会员角色Id要大于0")
    private Long subRoleId;

    /**
     * 积分类型：0-平台积分，1-会员积分
     */
    @NotNull(message = "积分类型：0-平台积分，1-会员积分")
    @Min(value = 0, message = "积分类型：0-平台积分，1-会员积分")
    @Max(value = 1, message = "积分类型：0-平台积分，1-会员积分")
    private Integer relType;

    /**
     * 前端Aes加密后的支付密码
     */
    @NotBlank(message = "支付密码不能为空")
    private String payPassword;

    /**
     * 消费的积分
     */
    @NotNull(message = "消费的积分要大于等于0")
    @PositiveOrZero(message = "消费的积分要大于等于0")
    private Integer usedPoint;

    /**
     * 积分消费类型枚举，定义在MemberRightSpendTypeEnum中
     */
    @NotNull(message = "积分消费项目名称不能为空")
    @MemberRightSpendTypeAnno
    private Integer spentType;

    /**
     * 订单编号（注意不是数据库的Id字段）
     */
    @NotBlank(message = "订单号不能为空")
    private String orderNo;

    public Long getUpperMemberId() {
        return upperMemberId;
    }

    public void setUpperMemberId(Long upperMemberId) {
        this.upperMemberId = upperMemberId;
    }

    public Long getUpperRoleId() {
        return upperRoleId;
    }

    public void setUpperRoleId(Long upperRoleId) {
        this.upperRoleId = upperRoleId;
    }

    public Long getSubMemberId() {
        return subMemberId;
    }

    public void setSubMemberId(Long subMemberId) {
        this.subMemberId = subMemberId;
    }

    public Long getSubRoleId() {
        return subRoleId;
    }

    public void setSubRoleId(Long subRoleId) {
        this.subRoleId = subRoleId;
    }

    public Integer getRelType() {
        return relType;
    }

    public void setRelType(Integer relType) {
        this.relType = relType;
    }

    public String getPayPassword() {
        return payPassword;
    }

    public void setPayPassword(String payPassword) {
        this.payPassword = payPassword;
    }

    public Integer getUsedPoint() {
        return usedPoint;
    }

    public void setUsedPoint(Integer usedPoint) {
        this.usedPoint = usedPoint;
    }

    public Integer getSpentType() {
        return spentType;
    }

    public void setSpentType(Integer spentType) {
        this.spentType = spentType;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }
}
